package com.tuju.jetpackfirstdemo.ui.circle_view

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.tuju.jetpackfirstdemo.R
import com.tuju.jetpackfirstdemo.utils.showToast
import kotlinx.android.synthetic.main.activity_circle.*

class CircleActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_circle)

        btn_start.setOnClickListener {
            circle_view.startAnimator()
        }

        btn_end.setOnClickListener {
            circle_view.stopAnimator()
        }

        tv_scroll_text.isSelected = true

        radio_group.setOnCheckedChangeListener { group, checkedId ->
            when (checkedId) {
                R.id.tv_shortest -> showToast("智行")
                R.id.tv_ramp -> showToast("无障碍")
                R.id.tv_elevator -> showToast("直梯")
                R.id.tv_escalator -> showToast("扶梯")
                R.id.tv_stair -> showToast("楼梯")
            }
        }

        mulit_button.setLimitCount(10)
        mulit_button.setMulitListener {
            showToast("触发了！！！")
        }
    }

}
